//自定义的对象类型
let boss = {
    name: '王嘉尔',
    age: 32,
    sex: '男',
};
//新的关键词 interface
interface Boss {
    name: string;
    age: number;
    sex: string;
}
//代表 boss1变量 是Boss类型的
//vscode会检查boss1是否具有Boss类型的属性和值
let boss1: Boss = {
    name: '可可',
    age: 16,
    sex: '女'
}
let boss2:Boss;
boss2.name='咪咪';
boss2.age=13;
boss2.sex='女';